-- BP 7.1.6 content: ModelClass syschar: 3 persistence-version: 7.1.6

INSERT INTO O_OBJ
	VALUES ("e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	'Subset',
	120,
	'SUB',
	'A proper subset represents a partitioning of a set or, in the case of an 
intersection, multiple sets. An improper subset represents the entire set, so 
an object can also be classified as subset.
   In OOA terms, a subtype always implies a subset, so set theory terms are 
used to provide better paths to common relationships in the metamodel.',
	"00000000-0000-0000-0000-000000000000");
INSERT INTO O_TFR
	VALUES ("2bff87d3-9110-4506-8dcb-988329dbec6f",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	'isSubInDomain',
	'',
	"ba5eda7a-def5-0000-0000-000000000001",
	1,
	'rc =false;
select one obj related by self->OBJ[R107];
if (not empty obj)
  if (obj.domain_name == param.domain)
    rc = true;
  end if;
else
  select one prp related by self->PRP[R107];
  // Check for root supertype.
  select one obj related by prp->NSB[R108]->SUP[R136]->OBJ[R134];
  while (empty obj)
    select many itss related by prp->ISB[R108]->ITS[R135];
    for each its in itss
      if (its.domain_name == param.domain)
        rc = true;
        break;
      end if;
    end for;
    if (not rc)
      // Move up to next subtyping
      select one prp related by prp->NSB[R108]->SUP[R136]->PRP[R114];
      // Check for root supertype.
      select one obj related by prp->NSB[R108]->SUP[R136]->OBJ[R134];
    end if;
  end while;
  if (not rc and (obj.domain_name == param.domain))
    rc = true;
  end if;
end if;
return rc;',
	1,
	'',
	"00000000-0000-0000-0000-000000000000",
	0,
	0);
INSERT INTO O_TPARM
	VALUES ("c0f7f9e0-8d27-4819-b3fe-648d28402542",
	"2bff87d3-9110-4506-8dcb-988329dbec6f",
	'domain',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'');
INSERT INTO O_TFR
	VALUES ("8173edd8-06a8-486e-bc1d-080e898a4796",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	'hasStateModel',
	'Returns true if the type of state model specified already exists for the subset.',
	"ba5eda7a-def5-0000-0000-000000000001",
	1,
	'rc = true;
if (param.assigner)
  select one asr related by self->ASR[R354];
  if (not empty asr)
    rc = false;
  end if;
else
  select one lif related by self->LIF[R347];
  if (not empty lif)
    rc = false;
  end if;
end if;
return rc;',
	1,
	'',
	"2bff87d3-9110-4506-8dcb-988329dbec6f",
	0,
	0);
INSERT INTO O_TPARM
	VALUES ("5fdefdc8-79a1-4d6c-a252-a549311db65d",
	"8173edd8-06a8-486e-bc1d-080e898a4796",
	'assigner',
	"ba5eda7a-def5-0000-0000-000000000001",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'True if the state model checking conserns an assigner state model.');
INSERT INTO O_TFR
	VALUES ("1e2d5026-c0a4-4eb7-a76a-4502af16a6a8",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	'instantiateAttributes',
	'Instantiate attributes associated directly with this subset, and then get the 
next level subsets and tell them to instantiate their attributes.',
	"ba5eda7a-def5-0000-0000-000000000000",
	1,
	'select one obj related by self->OBJ[R107];
if (not empty obj)
  select many oas related by obj->OA[R129];
  for each oa in oas
    select one nra related by oa->ATR[R124]->NRA[R103];
    select one type related by nra->TYPE[R123];
    nra.instantiate( objectInstance:param.objectInstance );
  end for;
else
  select one prp related by self->PRP[R107];
  select many spas related by prp->SPA[R130];
  for each spa in spas
    select one nra related by spa->ATR[R124]->NRA[R103];
    select one type related by nra->TYPE[R123];
    nra.instantiate( objectInstance:param.objectInstance );
  end for;
  select many sups related by prp->SUP[R122];
  for each sup in sups
    select one sub related by sup->OBJ[R134]->SUB[R107];
    if (empty sub)
      select one sub related by sup->PRP[R114]->SUB[R107];
    end if;
    sub.instantiateAttributes( objectInstance:param.objectInstance );
  end for;
end if;',
	1,
	'',
	"8173edd8-06a8-486e-bc1d-080e898a4796",
	0,
	0);
INSERT INTO O_TPARM
	VALUES ("4767b560-d54c-4bba-847b-1da04a390e41",
	"1e2d5026-c0a4-4eb7-a76a-4502af16a6a8",
	'objectInstance',
	"ba5eda7a-def5-0000-0000-000000000005",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'');
INSERT INTO O_TFR
	VALUES ("8a9a65a0-8ebf-4457-8634-e90c61732c82",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	'associateReferentials',
	'Finds identifiers in this subtype and creates referentials, then finds any 
higher-level sub/supertypes and repeats the operation.',
	"ba5eda7a-def5-0000-0000-000000000000",
	1,
	'select any irl from instances of IRL where selected.number == param.relationship;
// First collect any identifiers for this subtype
irl.createReferentials( objectName:self.name );
// Then search up the hierarchy until the root supertype is found.
select one obj related by self->OBJ[R107];
if (empty obj)
  select one prp related by self->PRP[R107];
  select many sups related by prp->SUP[R122];
  for each sup in sups
    select one sub related by sup->OBJ[R134]->SUB[R107];
    if (empty sub)
      select one sub related by sup->PRP[R114]->SUB[R107];
    end if;
    sub.associateReferentials( relationship:param.relationship );
  end for;
end if;
',
	1,
	'',
	"1e2d5026-c0a4-4eb7-a76a-4502af16a6a8",
	0,
	0);
INSERT INTO O_TPARM
	VALUES ("b766a8e6-3840-4763-a121-0f4dc33f1abb",
	"8a9a65a0-8ebf-4457-8634-e90c61732c82",
	'relationship',
	"ba5eda7a-def5-0000-0000-000000000002",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The numeric identifier for the instance relationship.');
INSERT INTO O_TFR
	VALUES ("e091af22-7284-49d5-81ab-75ae7b29c43e",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	'isSubsetOf',
	'Checks to see if this subset is a member of the named set (object).',
	"ba5eda7a-def5-0000-0000-000000000001",
	1,
	'rc = false;
select one obj related by self->OBJ[R107] where selected.name == param.object;
if (not empty obj)
  rc = true;
else
  select one nsb related by self->PRP[R107]->NSB[R108];
  if (not empty nsb)
    select one obj related by nsb->SUP[R136]->OBJ[R134] where selected.name == param.object;
    if (not empty obj)
      rc = true;
    else
      select one sub related by nsb->SUP[R136]->PRP[R114]->SUB[R107];
      rc = sub.isSubsetOf( object:param.object );
    end if;
  else
    select one isb related by self->PRP[R107]->ISB[R108];
    select any obj related by isb->OBJ[R135] where selected.name == param.object;
    if (not empty obj)
      rc = true;
    end if;
  end if;
end if;
return rc;',
	1,
	'',
	"8a9a65a0-8ebf-4457-8634-e90c61732c82",
	0,
	0);
INSERT INTO O_TPARM
	VALUES ("a16ec88f-65c6-464c-ba13-59da6bb2d6fa",
	"e091af22-7284-49d5-81ab-75ae7b29c43e",
	'object',
	"ba5eda7a-def5-0000-0000-000000000004",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'The name of the set of which this subset is a member.');
INSERT INTO O_TFR
	VALUES ("b007610e-8f7c-49e3-8c84-0c364a9f657d",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	'instantiateMethods',
	'',
	"ba5eda7a-def5-0000-0000-000000000000",
	1,
	'select one obj related by self->OBJ[R107];
if (not empty obj)
  select many nms related by obj->NM[R131];
  for each nm in nms
    select one im related by nm->IM[R533];
    im.instantiate( objectInstance:param.objectInstance );
  end for;
else
  select one prp related by self->PRP[R107];
  select many smts related by prp->SBT[R122]->OBS[R126]->SMT[R125];
  for each smt in smts
    select one im related by smt->IM[R533];
    im.instantiate( objectInstance:param.objectInstance );
  end for;
  select many sups related by prp->SUP[R122];
  for each sup in sups
    select one sub related by sup->OBJ[R134]->SUB[R107];
    if (empty sub)
      select one sub related by sup->PRP[R114]->SUB[R107];
    end if;
    sub.instantiateMethods( objectInstance:param.objectInstance );
  end for;
end if;
',
	1,
	'',
	"e091af22-7284-49d5-81ab-75ae7b29c43e",
	0,
	0);
INSERT INTO O_TPARM
	VALUES ("7b6e42be-b114-4fce-94c5-0efe8eb337d8",
	"b007610e-8f7c-49e3-8c84-0c364a9f657d",
	'objectInstance',
	"ba5eda7a-def5-0000-0000-000000000005",
	0,
	'',
	"00000000-0000-0000-0000-000000000000",
	'');
INSERT INTO O_NBATTR
	VALUES ("57abd564-7250-4bad-a3ae-ce9efbfbabd4",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0");
INSERT INTO O_BATTR
	VALUES ("57abd564-7250-4bad-a3ae-ce9efbfbabd4",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0");
INSERT INTO O_ATTR
	VALUES ("57abd564-7250-4bad-a3ae-ce9efbfbabd4",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	"00000000-0000-0000-0000-000000000000",
	'name',
	'A name of the subset, that is unique in the domain. For an improper subset, 
this will be the name of the object, but for a proper subset, it will be a 
name, that is a sub-classification of, the object name.',
	'',
	'name',
	0,
	"ba5eda7a-def5-0000-0000-000000000004",
	'',
	'');
INSERT INTO O_NBATTR
	VALUES ("d12b284e-4276-4a05-869c-6f11cc16640e",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0");
INSERT INTO O_BATTR
	VALUES ("d12b284e-4276-4a05-869c-6f11cc16640e",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0");
INSERT INTO O_ATTR
	VALUES ("d12b284e-4276-4a05-869c-6f11cc16640e",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	"57abd564-7250-4bad-a3ae-ce9efbfbabd4",
	'keyletters',
	'Keyletters allow one to be lazy about referring to a subset.
',
	'',
	'keyletters',
	0,
	"ba5eda7a-def5-0000-0000-000000000004",
	'',
	'');
INSERT INTO O_ID
	VALUES (0,
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0");
INSERT INTO O_OIDA
	VALUES ("57abd564-7250-4bad-a3ae-ce9efbfbabd4",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	0,
	'name');
INSERT INTO O_ID
	VALUES (1,
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0");
INSERT INTO O_OIDA
	VALUES ("d12b284e-4276-4a05-869c-6f11cc16640e",
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	1,
	'keyletters');
INSERT INTO O_ID
	VALUES (2,
	"e2538c3c-cbd1-4d5d-acc1-665650c264b0");
INSERT INTO PE_PE
	VALUES ("e2538c3c-cbd1-4d5d-acc1-665650c264b0",
	1,
	"f9697c43-84ee-4136-9c00-93842878f3b4",
	"00000000-0000-0000-0000-000000000000",
	4);
INSERT INTO EP_PKG_PROXY
	VALUES ("f9697c43-84ee-4136-9c00-93842878f3b4",
	"00000000-0000-0000-0000-000000000000",
	"c8b88000-dddc-4206-8410-2f69b8f86b67",
	'Object',
	'The subsystem of the metamodel concerning objects, instances, and attributes.',
	100,
	'../Object.xtuml');
